home *** CD-ROM | disk | FTP | other *** search
/ Space Shuttle - The First 100 Flights / Space Shuttle - The First 100 Flights.iso / xTras / DirectMedia Xtra Behaviors.cst / 00004_Script_DirectMedia Xtra Simple Control < prev    next >
Text File  |  2000-01-16  |  1KB  |  38 lines

  1. --DirectMedia Xtra Simple control   
  2.  
  3. property videoSprite    -- the sprite number that is getting controlled
  4. property videoCommand   -- the command to be issued
  5.  
  6.  
  7. on DoControl me
  8.   case ( the VideoCommand of me ) of:
  9.     #Play:
  10.       videoplay(sprite the videoSprite of me)
  11.     #Pause:
  12.       videopause(sprite the videoSprite of me)
  13.     #Rewind:
  14.       videoseek(sprite the videoSprite of me, the segmentstart of sprite the videoSprite of me)
  15.      
  16.   end case
  17. end
  18.  
  19.  
  20. on mouseUp me
  21.   DoControl me
  22. end
  23.  
  24.  
  25. ---
  26.  
  27.  
  28. on getPropertyDescriptionList
  29.   
  30.   set p_list = [   #videoCommand: [ #comment:   "Action:",#format:   #symbol,   #range: [ #Play, #Pause, #Rewind],#default:   #Play ], #videoSprite: [ #comment:   "DirectMedia Sprite Channel:", #format:   #integer,   #default:    1] ]                  
  31.   return p_list
  32. end
  33.  
  34. on getBehaviorDescription
  35.   return "Used to create Play, Pause, and Rewind control buttons for a DirectMedia Xtra video sprite. " & RETURN & "PARAMETERS:" & RETURN & "Action - Choose the action to perform on mouseUP ( Play, Pause, Rewind )." & RETURN & "DirectMedia Sprite Channel - Enter the number of sprite channel of the DirectMedia Xtra video that is being controlled."
  36. end
  37.  
  38.